import request from '@/utils/request'

const mudulePath = '/match/'
export function saveMatch(data) {
  return request({
    url: mudulePath + 'create',
    method: 'post',
    data
  })
}

export function updateMatch(data) {
  return request({
    url: mudulePath + 'update',
    method: 'post',
    data
  })
}

export function getMatchList(data) {
  return request({
    url: mudulePath + 'list',
    method: 'get',
    params: data
  })
}

export function onlyGetMatchList() {
  return request({
    url: mudulePath + 'listMatch',
    method: 'get'
  })
}

export function getMatchInfo(data) {
  return request({
    url: mudulePath + 'info',
    method: 'get',
    params: data
  })
}

export function deleteMatch(MatchIds) {
  return request({
    url: mudulePath + 'delete',
    method: 'post',
    data: MatchIds
  })
}

export function getAdminList(data) {
  return request({
    url: mudulePath + 'admin/list',
    method: 'get',
    params: data
  })
}

export function getRefereeRule() {
  return request({
    url: mudulePath + 'refereeRule/list',
    method: 'get'
  })
}

export function saveMatchAdmin(data) {
  return request({
    url: mudulePath + 'admin/save',
    method: 'post',
    data
  })
}
